package eu.boss.model;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Describes a PlayersList. the same as the server
 * @author Arnaud
 */

public class PlayersList {

	private List<Player> players;

	public PlayersList(PlayersList p)
	{
		players = new ArrayList<Player>();
		for (int i=0; i<p.getPlayers().size(); i++)
		{
			players.add(p.getPlayers().get(i));
		}
	}
	public PlayersList(){
		players = new ArrayList<Player>();
	}
	public List<Player> getPlayers() {
		return players;
	}

	public void setPlayers(List<Player> players) {
		this.players = players;
	}
	
	/**
	 * Sort playerlist by ratio
	 */
	public void sort()
	{
		Collections.sort(players);
	}
}
